package com.usian.user.feign;

import com.usian.common.Result;
import com.usian.entity.OrderDetails;
import com.usian.entity.Orders;
import com.usian.entity.PaymentRecords;
import org.apache.poi.hpsf.Date;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.w3c.dom.CharacterData;

import java.util.List;

@FeignClient("order")
public interface OrderFeignClient {
    @GetMapping("/order/orders/getOrderByUserId/{userId}")
    public Result<Orders> getOrderByUserId(@PathVariable Integer userId);

    @GetMapping("/order/order-details/getOrderDetailsByOrderId/{orderId}")
    public Result<OrderDetails> getOrderDetailsByOrderId(@PathVariable Integer orderId);

    @GetMapping("/order/payment-records/getPaymentRecordsByOrderId/{orderId}")
    public Result<PaymentRecords> getPaymentRecordsByOrderId(@PathVariable Integer orderId);

    //查询预定中的订单
    @GetMapping("/order/orders/findAllBooked/{userId}")
    Result<Orders> findAllBooked(@PathVariable Integer userId);

    @GetMapping("/order/orders/findOrderHistory/{userId}")
    Result<List<Orders>> findOrderHistory(@PathVariable Integer userId);

    @GetMapping("/order/orders/findAllList/{userId}")
    Result<List<Orders>> findAllList(@PathVariable Integer userId);

    @GetMapping("/order/orders/findAllzhifu/{userId}")
    Result<Orders> findAllzhifu(@PathVariable Integer userId);
}
